﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManagSubjectInfo.aspx.cs" Inherits="ExamV5.ManagSys.ManagSubjectInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="Content-Language" content="zh-cn" />
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	
    <link href="../Image/STYLE.CSS" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        function CheckData() {

            if (document.getElementById("DDLUPSubject").value == "") {
                alert("上级科目名称不可以为空！");
                document.getElementById("DDLUPSubject").focus();
                return false;
            }
            if (document.getElementById("txtSubjectName").value == "") {
                alert("考试科目名称不可以为空！");
                document.getElementById("txtSubjectName").focus();
                return false;
            }
            if (document.getElementById("txtSortInfo").value == "") {
                alert("考试科目排序不可以为空！");
                document.getElementById("txtSortInfo").focus();
                return false;
            }
            
            return true;
        }

        function ShowBUserList(txtBrowUserName, txtBrowUserCode) {
            var strusername = "";
            var strname = "";
            strname = document.getElementById("txtBrowUserName").value;
            strusername = document.getElementById("txtBrowUserCode").value;
            strtmpusers = textUser(strusername, strname,'B');
            if (strtmpusers != "") {
                strtmpusers = strtmpusers.split("_");
                document.getElementById("txtBrowUserCode").value = strtmpusers[0];
                document.getElementById("txtBrowUserName").value = strtmpusers[1];

            }
        }

        function ShowEUserList(txtEditUserName, txtEditUserCode) {
            var strusername = "";
            var strname = "";
            strname = document.getElementById("txtEditUserName").value;
            strusername = document.getElementById("txtEditUserCode").value;
            strtmpusers = textUser(strusername, strname,'E');
            if (strtmpusers != "") {
                strtmpusers = strtmpusers.split("_");
                document.getElementById("txtEditUserCode").value = strtmpusers[0];
                document.getElementById("txtEditUserName").value = strtmpusers[1];

            }
        }

        function textUser(usernames, names,strEB) {
            strURL = "FrmSelectUser.aspx?EB=" + strEB + "&TypeValue=S&strFlag=A&ID=" + document.getElementById("txtID").value;
            var obj = new Object();
            obj.username = usernames;
            obj.name = names;

            var iWidth = 620;
            var iHeight = 650;
            var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
            var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
            var strvalue = window.open(strURL, "", "height=" + iHeight + ", width=" + iWidth + ", top=" + iTop + ", left=" + iLeft + ",status=no,toolbar=no,menubar=no,location=no");
            if (strvalue == undefined) {
                return window.returnValue;
            }
            else if (strvalue != "")
                return strvalue;
            else
                return false;
        }

        function ShowBDeptList(txtBrowDeptName, txtBrowDeptID) {
            var strusername = "";
            var strname = "";
            strname = document.getElementById("txtBrowDeptName").value;
            strusername = document.getElementById("txtBrowDeptID").value;
            strtmpusers = textDept(strusername, strname);
            if (strtmpusers != "") {
                strtmpusers = strtmpusers.split("_");
                document.getElementById("txtBrowDeptID").value = strtmpusers[0];
                document.getElementById("txtBrowDeptName").value = strtmpusers[1];

            }
        }

        function textDept(usernames, names) {
            var strURL = "FrmSelectDept.aspx?Flag=S&ID=" + document.getElementById("txtID").value;
            var obj = new Object();
            obj.username = usernames;
            obj.name = names;

            var iWidth = 620;
            var iHeight = 600;
            var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
            var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
            var strvalue = window.open(strURL, "", "height=" + iHeight + ", width=" + iWidth + ", top=" + iTop + ", left=" + iLeft + ",status=no,toolbar=no,menubar=no,location=no");
            if (strvalue == undefined) {
                return window.returnValue;
            }
            else if (strvalue != "")
                return strvalue;
            else
                return false;
        }

    </script>
</head>
<body>
    <form id="form1" runat="server" >
     <asp:ScriptManager ID="SM" runat="server">
                        </asp:ScriptManager>
                        <asp:UpdatePanel ID="UPPart" runat="server">
                           <ContentTemplate>
                            <table cellSpacing="0" cellPadding="0" border="0">
                            <tr>
		   <td width=37><img src="../image/BobyTip.gif" border="0" /></td>
           <td>当前位置：<a href='../FrmMain.aspx'>系统首页</a> > 系统信息设置 > 考试科目管理</td>
	    </tr>
        </table>
        <table cellSpacing="0" cellPadding="0" border="0" width="100%">
        <tr>
           <td  height=51  background="../image/BobyModNameBG.gif">
                    <table cellSpacing="0" cellPadding="0" border="0">
                        <tr>
                            <td width=5></td>
                            <td width="133"  background="../image/HeadTitleCB.gif" height="41" align="center"><a href='ManagSubjectInfo.aspx'  onfocus='this.blur();'><img src="../image/MenuICO/k4.gif" border="0" style='POSITION:relative;TOP:3px'> <font color="#ffffff"><b>考试科目管理</b></font></a></td>
                        </tr>
                   </table>
            </td>
         </tr>

                                <tr>
                                    <td><table border="0" width="100%" cellpadding="0" cellspacing="0">
										<tr>
											<td valign="top" align="left" width="50%">
                                                <asp:TreeView ID="TreeDept" runat="server" ImageSet="BulletedList3" 
                                                    ShowLines="True" onselectednodechanged="TreeDept_SelectedNodeChanged">
                                                </asp:TreeView>
                                            </td>
                                            <td valign="top">
                                            <table id="table2" borderColor="#cccccc" cellSpacing="0" borderColorDark="#cccccc" cellPadding="0"
							width="99%" align="center" border="1" class="tableStyle"  style="border-style:Solid;">
							<tr height="35">
								<td bgColor="#d4e5f5">&nbsp;<img src="../Image/MenuICO/Choose23.gif" border="0"  style='POSITION:relative;TOP:3px'><strong> <font color="#003399">一、填写考试科目详细资料</font></strong></td>
							</tr>
                            <tr height="30">
											<td bgColor="#ffffff" colSpan="2"><font color="red">&nbsp;注：带*号的为必填项目,排序请输入数字！</font> 
											    <asp:Label ID="labID" runat="server" Text="0" Visible=false></asp:Label>
                                                <asp:Label ID="labName" runat="server" Visible=false></asp:Label>
											</td>
										</tr>
							<tr>
								<td>
									<table id="table3" borderColor="#cccccc" cellSpacing="0" borderColorDark="#cccccc" cellPadding="0"
										width="100%" align="center" border="1" class="tableStyle">
										
										
										
                                        <tr bgColor="#f5fcfe" height="30">
											<td align="right" width="120"><font color="red">*</font> 上级科目名称：</td>
											<td bgColor="#f5fcfe"><asp:DropDownList id="DDLUPSubject" runat="server" Width="305px" style="height:26px;"></asp:DropDownList></td>
										</tr>
										<tr bgColor="#ffffff" height="30">
											<td align="right" width="120"><font color="red">*</font> 考试科目名称：</td>
											<td bgColor="#ffffff"><asp:textbox id="txtSubjectName" runat="server" Width="303px" CssClass="text" Height="23px" MaxLength="50"></asp:textbox></td>
										</tr>
                                         <tr bgColor="#f5fcfe" height="30">
											<td align="right" width="120"><font color="red">*</font> 设置浏览部门：</td>
											<td bgColor="#f5fcfe" valign=middle><textarea class="text" id="txtBrowDeptName" name="txtBrowDeptName"  readonly row="3" style="WIDTH: 300px; HEIGHT: 100px"><%=strBrowDeptName%></textarea><a href='#' onfocus='this.blur();' onclick="javascript:ShowBDeptList('txtBrowDeptName','txtBrowDeptID');"><img alt="选择部门信息" src="../image/butChooseA.gif" border="0" style="POSITION:relative;TOP:-40px"></a>
                                            <br>
                                            <input id="txtBrowDeptID" name="txtBrowDeptID"  type="hidden" value="<%=strBrowDeptID%>"></td>
										</tr>
										<tr bgColor="#ffffff" height="30">
											<td align="right" width="120"><font color="red">*</font> 设置浏览人员：</td>
											<td bgColor="#ffffff" valign=middle><textarea class="text" id="txtBrowUserName" name="txtBrowUserName" readonly row="3" style="WIDTH: 300px; HEIGHT: 100px"><%=strBrowUserName%></textarea><a href='#' onfocus='this.blur();' onclick="javascript:ShowBUserList('txtBrowUserName','txtBrowUserCode');"><img alt="选择人员信息" src="../image/butChooseA.gif" border="0" style="POSITION:relative;TOP:-40px"></a>
                                            <br>
                                            <input id="txtBrowUserCode"  name="txtBrowUserCode" type="hidden" value="<%=strBrowUserCode%>"></td>
										</tr>
                                        <tr bgColor="#f5fcfe" height="30">
											<td align="right" width="120"><font color="red">*</font> 设置编辑人员：</td>
											<td bgColor="#f5fcfe" valign=middle><textarea class="text" id="txtEditUserName" name="txtEditUserName" readonly row="3" style="WIDTH: 300px; HEIGHT: 100px"><%=strEditUserName%></textarea><a href='#' onfocus='this.blur();' onclick="javascript:ShowEUserList('txtEditUserName','txtEditUserCode');"><img alt="选择人员信息" src="../image/butChooseA.gif" border="0" style="POSITION:relative;TOP:-40px"></a>
                                            <br><input id="txtID" name="txtID" type="hidden" value="<%=strID%>">
                                            <input id="txtEditUserCode" name="txtEditUserCode" type="hidden" value="<%=strEditUserCode%>"></td>
										</tr>

                                        <tr bgColor="#ffffff" height="30">
                                                    <td align="right" width="120">
                                                        <font color="red">*</font> 考试科目排序：</td>
                                                    <td bgColor="#ffffff">
                                                        <asp:TextBox ID="txtSortInfo" runat="server" CssClass="text" Height="23px" 
                                                            MaxLength="5" 
                                                            onKeypress="javascript:if (event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false;" 
                                                            onpaste="return false" style="IME-MODE:disabled" Width="303px"></asp:TextBox>
                                                    </td>
                                        </tr>
                                           
                                        
									</table>
								</td>
							</tr>
                            
                   </table>	
                   <table id="table1" borderColor="#cccccc" cellSpacing="0" borderColorDark="#cccccc" cellPadding="0"
							width="99%" align="center" border="0"><tr>
								            <td align="center"><br />
                                                <asp:Button ID="butDefault" runat="server" Text="提  交" CssClass="but2B"  
                                                    OnClientClick="return CheckData();"  onclick="butDefault_Click"/> <asp:Button ID="butDel" runat="server" Text="删  除" CssClass="but2R"  onclick="butDel_Click"/><br /><br /></td>
							            </tr>
                   </table>	
                                            </td>
										</tr>
									    </table>
                                    </td>
                                </tr>
                                
                                </table>
                         </ContentTemplate>
                        </asp:UpdatePanel>
					 
    </form>
</body>
</html>
